SELFILE.COM

This is a simple program made with ASIC that displays a
file selection screen. After choosing a file and pressing
return or another action key (escape by default) it writes
the file SELFILE$.BAT that when called sets the variables
main, ext and key. Key is always returned uppercase.

Usage: SELFILE filemask [extrakeys]

Note - make sure there's enough room to the screen bottom
or the extra filenames will not be visible, best to preceed
with a CLS to make sure.

:: Example batch, calls SELFILE, LIST, EDIT
@echo off
:loop
cls
echo.
echo Pick a TXT file to list, or press E to edit...
echo.
selfile *.TXT e
call selfile$
del selfile$.bat
if not exist %main%.%ext% goto end
if .%key%==.E edit %main%.%ext%
if not .%key%==.E list %main%.%ext%
goto loop
:end
